import QtQuick 2.0

Rectangle {
    width: 300;
    height: 200;

    // anchors.fill:parent 填充整个父级
    Rectangle {
        color: "blue";
        anchors.fill: parent;
        border.width: 6;
        border.color: "#888888";

        // anchors.centerIn:parent 坐落在父级的中心
        Rectangle {
            anchors.centerIn: parent;
            width: 120;
            height: 120;
            radius: 8;
            border.width: 2;
            border.color: "black";
            antialiasing: true;
            color: "red";
        }
    }
}
